Skip to content

ULTRA l1c counts nside update#2857

Merged
lacoak21 merged 10 commits intoIMAP-Science-Operations-Center:devfrom
lacoak21:ultra_l1c_counts_nside
Mar 26, 2026
Merged

ULTRA l1c counts nside update#2857
lacoak21 merged 10 commits intoIMAP-Science-Operations-Center:devfrom
lacoak21:ultra_l1c_counts_nside

Conversation

@lacoak21
Copy link
Contributor

Change Summary

closes #2696

Overview

Counts at l1c need to be binned at a higher resolution and then downsampled at l2.

File changes

Testing

Add tests to check downsampling.

@lacoak21 lacoak21 added this to the March 2026 milestone Mar 23, 2026
@lacoak21 lacoak21 self-assigned this Mar 23, 2026
@lacoak21 lacoak21 added this to IMAP Mar 23, 2026
@lacoak21 lacoak21 added the Ins: Ultra Related to the IMAP-Ultra instrument label Mar 23, 2026
@lacoak21 lacoak21 requested a review from laspsandoval March 23, 2026 18:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates ULTRA L1C count-map handling to mitigate aliasing by writing counts on a finer HEALPix grid (higher nside) and then downsampling to the PSET grid during ENA map processing (L2-facing UltraPointingSet).

Changes:

  • Introduces a separate counts_pixel_index coordinate/dimension for L1C counts and sets a fixed higher-resolution L1C_COUNTS_NSIDE.
  • Updates L1C PSET generation to bin counts at the higher nside while keeping other variables on the nominal PSET grid.
  • Adds UltraPointingSet.downsample_counts() and corresponding test updates/mocks.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
imap_processing/ultra/utils/ultra_l1_utils.py Adds counts_pixel_index coord and changes counts dims to use it.
imap_processing/ultra/l1c/spacecraft_pset.py Bins counts at L1C_COUNTS_NSIDE and adds counts_pixel_index.
imap_processing/ultra/l1c/helio_pset.py Same as spacecraft PSET, for helio PSET generation.
imap_processing/ultra/constants.py Adds UltraConstants.L1C_COUNTS_NSIDE = 128.
imap_processing/tests/ultra/mock_data.py Updates mock L1C PSET generator to produce higher-res counts than other variables.
imap_processing/tests/ena_maps/test_ena_maps.py Adds downsampling test and patches init test to bypass downsampling.
imap_processing/ena_maps/utils/coordinates.py Introduces CoordNames.COUNTS_HEALPIX_INDEX.
imap_processing/ena_maps/ena_maps.py Adds UltraPointingSet.downsample_counts() and calls it in __init__.
imap_processing/cdf/config/imap_ultra_l1c_variable_attrs.yaml Updates counts.DEPEND_2 to counts_pixel_index.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@subagonsouth subagonsouth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, I am surprised that Ultra is changing something this fundamental this late in the game! Overall, this looks good. I think that Copilot has some valuable feedback in places. I just have a couple of suggestions.

@lacoak21
Copy link
Contributor Author

Wow, I am surprised that Ultra is changing something this fundamental this late in the game! Overall, this looks good. I think that Copilot has some valuable feedback in places. I just have a couple of suggestions.

Agreed. I met with Tenzin this morning to chat about all the last minute requests coming in 😨. Oops also I realized I had stashed code - sorry for some unfinished stuff

Copy link
Contributor

@subagonsouth subagonsouth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

@lacoak21 lacoak21 merged commit 4e1b2d2 into IMAP-Science-Operations-Center:dev Mar 26, 2026
14 checks passed
@lacoak21 lacoak21 deleted the ultra_l1c_counts_nside branch March 26, 2026 16:51
@github-project-automation github-project-automation bot moved this to Done in IMAP Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ins: Ultra Related to the IMAP-Ultra instrument

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ULTRa L1c write counts at a higher nside to combat aliasing

3 participants